package com.example.demo.util;

import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.ZipUtil;

import java.io.File;

/**
 * Description: 压缩文件<br/>
 *
 * @author Sender<br   />;
 * @taskId <br/>
 * @Date 2019/5/14 15:30
 * @Version 1.0
 */
public class ZipTest {

    /**
     * 压缩文件
     */
    public static void zip(String file) {
        try {
            ZipUtil.zip(file, "d:\\temp");
        } catch (Exception e) {
            System.out.println(e);
        }
        System.out.println("压缩成功!");
    }

    public static void main(String[] args) {
        zip("F:\\Development\\boss_V2.8.0.0\\rbac\\user");
    }
}
